package com.xdog.web3.exception;

/**
 * Web3 API异常类
 */
public class Web3ApiException extends RuntimeException {
    
    private final String code;
    private final int httpStatus;
    
    public Web3ApiException(String code, int httpStatus, String message) {
        super(message);
        this.code = code;
        this.httpStatus = httpStatus;
    }
    
    public Web3ApiException(String code, int httpStatus, String message, Throwable cause) {
        super(message, cause);
        this.code = code;
        this.httpStatus = httpStatus;
    }
    
    public String getCode() {
        return code;
    }
    
    public int getHttpStatus() {
        return httpStatus;
    }
}